﻿<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" MasterPageFile="~/_layouts/application.master"      %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Register Tagprefix="psw" Namespace="PhilWicklund.com.SiteCreationWorkflow.Utilities" Assembly="PhilWicklund.com.SiteCreationWorkflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0c581f3907d72045" %> 

<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Import Namespace="PhilWicklund.com.SiteCreationWorkflow.Utilities" %>

<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
	<SharePoint:EncodedLiteral runat="server" text="Site Request Reasoning" EncodeMethod='HtmlEncode'/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server">
	<SharePoint:EncodedLiteral runat="server" text="Please enter your purpose for this new site" EncodeMethod='HtmlEncode'/>
</asp:Content>

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<script runat="server">
	protected void Button1_Click(object sender, EventArgs e)
	{
		try {
			WorkflowItemFactory.SiteJustificationUpdate(SPContext.Current.Web.Url, justification.Text);
			this.Page.Response.Redirect("requestsubmitted.aspx");
		} catch (Exception ex)
		{
			Label1.Text = ex.Message;
			Label1.Visible = true;	
		}
	}
</script>

<strong>
	<asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="Red" Text="Label"
		Visible="False"></asp:Label><br />
</strong>

<asp:TextBox runat="server" TextMode="MultiLine" Rows="15" Columns="70" ID="justification"></asp:TextBox><br />
<asp:RequiredFieldValidator runat="server" ControlToValidate="justification" ErrorMessage="This feild is required..." Display="Dynamic"></asp:RequiredFieldValidator>
<br /><br />
<asp:Button OnClick="Button1_Click" runat="server" ID="Button1" Text="Submit" />
</asp:Content>
